home *** CD-ROM | disk | FTP | other *** search
/ Fifty: Elektronik / FIFTY Elektronik (PS_Computer_Vertrieb).iso / ps8 / fty1017 / gepackt.exe / DISK2 / PLOTSRC.EXE / PLOTTEN.INC < prev    next >
Encoding:
Text File  |  1993-11-10  |  2.2 KB  |  99 lines

  1. Procedure InitDefault(Var Erfolglos:Boolean);
  2. Var Bild :Bildelement;
  3.     NewDefault  :Defaults absolute Bild;
  4.     Key     :Str5;
  5.     DatRef,K  :Integer;
  6.   Begin
  7.     Erfolglos:=false;
  8.     (*$I-*)
  9.     Seek(HauptDF,0);
  10.     BlockRead(HauptDF,Bild,1);
  11.     Ok:=IoResult=0;
  12.     (*$I+*)
  13.     SetupInfo.Voreinstellung:=Newdefault;
  14.     With SetupInfo.Voreinstellung Do
  15.       Begin
  16.         Status:=0;
  17.         Ursprung.X:=0;Ursprung.Y:=0;
  18.         PlotLayers:=[0..MaxLayer];
  19.       End;
  20.     With SetupInfo.PinstInfo do
  21.     begin
  22.       Limit(PenMin,1,9);
  23.       Limit(PenMax,1,9);
  24.       For K:=1 To MaxLayer+1 Do
  25.         PenLookUp[K]:=PenMin;
  26.     end;
  27.     For K:=1 to 9 do Stiftbreiten[K]:=0.3;
  28.     If Not(Ok) Then Error(104);
  29. End;
  30.  
  31. Procedure Quitplot;
  32. Var S1,S2 :Str64;
  33. Begin
  34.   Str(Cardinal(UsedRecs(HauptDF)):6:0,S1);
  35.   Str(UsedRecs(HauptDF)*0.0361:6:1,S2);
  36.   Title_Line(25,'Die Datei '+HauptF+' hatte '+S1+' aktive Eintraege / '
  37.                 +S2+' K-Byte');
  38.   Delay(120*DelFac);
  39. End;
  40.  
  41. Procedure MainPlot;
  42. Var Quit: Boolean;
  43.     Sel,Wok :Integer;
  44. Begin
  45.   Quit:=false;
  46.   InitDefault(Quit);
  47.   sel:=1;
  48.   If BatchPar.Parname<>'' then SetParams(BatchPar,false);
  49.   While Not(Quit) Do
  50.   begin
  51.     ActualHelp:=86;
  52.       wok := 0;
  53.       WriteToWindow(men_main.picture,15,5,MainWinCol,PlotModeRep[PlotModus]);
  54.       If Batch then
  55.         Sel:=5
  56.       else sel := GetMenueChoice(men_main,wok);
  57.       Case sel of
  58.        1:Formate;
  59.        2:ShowLayers(MaxLayer+1);
  60.        3:SetStiftbreite;
  61.        4:SetModus;
  62.        5:Darstellen(HauptDF);
  63.        6:Vorlage_laden;
  64.        7:Vorlage_Speichern;
  65.        8:Vorlage_loeschen;
  66.       end;
  67.       Border;
  68.       Quit:=(Sel=0) or Batch;
  69.   end;
  70.   QuitPlot;
  71. End;
  72.  
  73. Procedure Plotten;
  74.  
  75. Begin
  76.   ActualHelp:=86;
  77.   Normvideo;
  78.   Border;
  79.   InitMacs;
  80.   PlotInit;
  81.   DataF:=HauptF+Dsuf;
  82.   ProcessFileName(ActivePath,DataF);
  83.   OpenFile(HauptDF,DataF);
  84.   If Ok Then
  85.     Begin
  86.       DWGopen:=true;
  87.       MainPlot;
  88.       CloseFile(HauptDF);
  89.       DWGopen:=false;
  90.     End
  91.   Else
  92.     Begin
  93.       If Batch Then Error(103);
  94.       TC:=SelectError('Keine Bildatei '+HauptF+' gefunden  - <Esc>','Fehler:',[Esc]);
  95.     End;
  96.   ClearMacs;
  97. End;
  98.  
  99.